<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>LT 的后台</title>
    <link rel="icon" href="favicon.ico" type="image/ico">
    <meta name="keywords" content="后台系统">
    <meta name="description" content="勉强算个管理系统">
    <meta name="author" content="yinqi">
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/materialdesignicons.min.css" rel="stylesheet">
    <link href="css/style.min.css" rel="stylesheet">
    <script type="text/javascript" src="js/jquery-3.5.1.min.js"></script>
    <script type="text/javascript" src="js/jquery.cookie.js"></script>

</head>

<body>
<div class="lyear-layout-web">
    <div class="lyear-layout-container">
<!--        头文件-->
        <div class="headerpage"></div>
        <script>
            $(".headerpage").load("header.html");
        </script>

        <!--页面主要内容-->
        <main class="lyear-layout-content">

            <div class="container-fluid">





                <div class="row">

                    <div class="col-lg-12">
                        <div class="card">
                            <div class="card-header">
                                <h4>成员学信息</h4>
                            </div>

                            <script>

                                function  del(username0) {
                                    console.log(username0)
                                    $.ajax({

                                        url: "./delUser/"+username0,
                                        type: "GET",
                                        dataType: "json",
                                        success: function(result) {
                                            data1=result;
                                            console.log("del success")
                                            aa()
                                        },
                                        error:function (result) {
                                            data1=result;
                                            console.log(result);
                                            alert("删除失败,权限不够")


                                        }
                                    });
                                }

                                function aa() {

                                    $.ajax({
                                        url: "./selectAll",
                                        type: "POST",
                                        success: function(result) {
                                            console.log(result)
                                            result=JSON.parse(result)

                                            tstr=`<table class="table table-hover">
                                        <thead>
                                        <tr>
                                            <th>id</th>
                                            <th>名称</th>
                                            <th>密码</th>
                                            <th>head</th>
                                            <th>tags</th>
                                            <th>进度</th>
                                            <th>删除？</th>
                                        </tr>
                                        </thead>
                                        <tbody>`
                                            a=result
                                            a.forEach(e=>{
                                                tstr=tstr+`<tr>
                                            <td>${e.id}</td>
                                            <td>${e.username}</td>
                                            <td>${e.password}</td>
                                            <td>${e.head}</td>
                                            <td>${e.tags}</td><td>
                                                <div class="progress progress-striped progress-sm">
                                                    <!-- 进度条 -->
                                                    <div class="progress-bar progress-bar-success" style="width: ${Number(e.plan)*10}%;"></div>
                                                    </div>
                                                    </td>
                                                    <th><button class="btn btn-danger" onclick="del(${e.id})"> 删除</button></th>
                                                    </tr>`
                                                    });
                                            tstr=tstr+`</tbody>
                                    </table>`
                                            $("#t1").html(tstr)
                                        },
                                        error:function (result) {
                                            console.log("false")
                                        }
                                    })

                                }
                                $(aa())





                            </script>
                            <div class="card-body">
                                <div class="table-responsive" id="t1">
<!--                                    <table class="table table-hover">-->
<!--                                        <thead>-->
<!--                                        <tr>-->
<!--                                            <th>id</th>-->
<!--                                            <th>名称</th>-->
<!--                                            <th>head</th>-->
<!--                                            <th>tag</th>-->
<!--                                            <th>进度</th>-->
<!--                                        </tr>-->
<!--                                        </thead>-->
<!--                                        <tbody>-->
<!--                                        <tr>-->
<!--                                            <td>1</td>-->
<!--                                            <td>设计新主题</td>-->
<!--                                            <td>10/02/2019</td>-->
<!--                                            <td>12/05/2019</td>-->
<!--                                            <td><span class="label label-warning">待定</span></td>-->
<!--                                            <td>-->
<!--                                                <div class="progress progress-striped progress-sm">-->
<!--                                                    &lt;!&ndash; 进度条 &ndash;&gt;-->
<!--                                                    <div class="progress-bar progress-bar-warning" style="width: 45%;"></div>-->
<!--                                                </div>-->
<!--                                            </td>-->
<!--                                        </tr>-->
<!--                                        <tr>-->
<!--                                            <td>2</td>-->
<!--                                            <td>网站重新设计</td>-->
<!--                                            <td>01/03/2019</td>-->
<!--                                            <td>12/04/2019</td>-->
<!--                                            <td><span class="label label-success">进行中</span></td>-->
<!--                                            <td>-->
<!--                                                <div class="progress progress-striped progress-sm">-->
<!--                                                    <div class="progress-bar progress-bar-success" style="width: 30%;"></div>-->
<!--                                                </div>-->
<!--                                            </td>-->
<!--                                        </tr>-->
<!--                                        <tr>-->
<!--                                            <td>3</td>-->
<!--                                            <td>模型设计</td>-->
<!--                                            <td>10/10/2019</td>-->
<!--                                            <td>12/11/2019</td>-->
<!--                                            <td><span class="label label-warning">待定</span></td>-->
<!--                                            <td>-->
<!--                                                <div class="progress progress-striped progress-sm">-->
<!--                                                    <div class="progress-bar progress-bar-warning" style="width: 25%;"></div>-->
<!--                                                </div>-->
<!--                                            </td>-->
<!--                                        </tr>-->
<!--                                        <tr>-->
<!--                                            <td>4</td>-->
<!--                                            <td>后台管理系统模板设计</td>-->
<!--                                            <td>25/01/2019</td>-->
<!--                                            <td>09/05/2019</td>-->
<!--                                            <td><span class="label label-success">进行中</span></td>-->
<!--                                            <td>-->
<!--                                                <div class="progress progress-striped progress-sm">-->
<!--                                                    <div class="progress-bar progress-bar-success" style="width: 55%;"></div>-->
<!--                                                </div>-->
<!--                                            </td>-->
<!--                                        </tr>-->
<!--                                        <tr>-->
<!--                                            <td>5</td>-->
<!--                                            <td>前端设计</td>-->
<!--                                            <td>10/10/2019</td>-->
<!--                                            <td>12/12/2019</td>-->
<!--                                            <td><span class="label label-danger">未开始</span></td>-->
<!--                                            <td>-->
<!--                                                <div class="progress progress-striped progress-sm">-->
<!--                                                    <div class="progress-bar progress-bar-danger" style="width: 0%;"></div>-->
<!--                                                </div>-->
<!--                                            </td>-->
<!--                                        </tr>-->
<!--                                        <tr>-->
<!--                                            <td>6</td>-->
<!--                                            <td>桌面软件测试</td>-->
<!--                                            <td>10/01/2019</td>-->
<!--                                            <td>29/03/2019</td>-->
<!--                                            <td><span class="label label-success">进行中</span></td>-->
<!--                                            <td>-->
<!--                                                <div class="progress progress-striped progress-sm">-->
<!--                                                    <div class="progress-bar progress-bar-success" style="width: 75%;"></div>-->
<!--                                                </div>-->
<!--                                            </td>-->
<!--                                        </tr>-->
<!--                                        <tr>-->
<!--                                            <td>7</td>-->
<!--                                            <td>APP改版开发</td>-->
<!--                                            <td>25/02/2019</td>-->
<!--                                            <td>12/05/2019</td>-->
<!--                                            <td><span class="label label-danger">暂停</span></td>-->
<!--                                            <td>-->
<!--                                                <div class="progress progress-striped progress-sm">-->
<!--                                                    <div class="progress-bar progress-bar-danger" style="width: 15%;"></div>-->
<!--                                                </div>-->
<!--                                            </td>-->
<!--                                        </tr>-->
<!--                                        <tr>-->
<!--                                            <td>8</td>-->
<!--                                            <td>Logo设计</td>-->
<!--                                            <td>10/02/2019</td>-->
<!--                                            <td>01/03/2019</td>-->
<!--                                            <td><span class="label label-warning">完成</span></td>-->
<!--                                            <td>-->
<!--                                                <div class="progress progress-striped progress-sm">-->
<!--                                                    <div class="progress-bar progress-bar-success" style="width: 100%;"></div>-->
<!--                                                </div>-->
<!--                                            </td>-->
<!--                                        </tr>-->
<!--                                        </tbody>-->
<!--                                    </table>-->
                                </div>
                            </div>
                        </div>
                    </div>

                </div>

            </div>

        </main>
        <!--End 页面主要内容-->
    </div>
</div>


<!--图表插件-->


</body>
</html>